package com.tgr.shortLink.admin.common.config;

import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.context.annotation.Configuration;

/**
 * 描述：
 * 作者：小陶不慌张
 * 文件：DataBaseConfiguration
 * 日期：2024/1/17 13:37
 */
@Configuration("dataBaseConfigurationByAdmin")
public class DataBaseConfiguration {
    /**
     * 分页插件
     */
    public MybatisPlusInterceptor mybatisPlusInterceptor(){
        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
        interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
        return interceptor;
    }
}
